package com.itdct.onflow.core.scanner

import com.itdct.onflow.core.annotation.TableDescription
import org.springframework.beans.factory.config.BeanDefinitionHolder
import org.springframework.beans.factory.support.BeanDefinitionRegistry
import org.springframework.context.annotation.ClassPathBeanDefinitionScanner
import org.springframework.core.type.filter.AnnotationTypeFilter

/**
 * @author Zhouwx
 * @date 2025/8/18 10:40:36
 * @version 1.0
 * @description
 */
class TableDescriptionScanner(registry: BeanDefinitionRegistry) : ClassPathBeanDefinitionScanner(registry) {

    override fun registerDefaultFilters() {
//        super.registerDefaultFilters()
        addIncludeFilter(AnnotationTypeFilter(TableDescription::class.java))
    }

    public override fun doScan(vararg basePackages: String): MutableSet<BeanDefinitionHolder> {
        return super.doScan(*basePackages)
    }
}